package com.gdou.crrp.repository;

import com.gdou.crrp.entity.Doctor;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface DoctorRepository extends JpaRepository<Doctor, Integer> {

    List<Doctor> findByDid(Integer did);

    Doctor findByDidAndName(Integer did, String name);

    List<Doctor> findByName(String name);

    @Query(value="select name from Doctor")
    List<String> find();
}
